{-# LANGUAGE OverloadedStrings #-}

import Util
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import Text.LaTeX.Packages.Graphicx
import Text.LaTeX.Packages.Geometry

main :: IO ()
main = printdoc doc

doc :: Monad m => LaTeXT_ m
doc = do
    textblock' (vw 0.95) (vh 0.45) $ itemize $ do
        item $ Just $ large2 $ "table of contents"
        item $ Just "YOU ARE HERE"
        item $ Just "at peace"
        item $ Just "Echoes"
        item $ Just "crashing"
        item $ Just "The treachery of icosahedra"
        item $ Just "Footprints"
        item $ Just "a!"
        item $ Just "The Collapse"
        item $ Just "Symphony For Twenty Thousand Cats, Movement One"
        item $ Just "Symphony For Twenty Thousand Cats, Movement Two"
        item $ Just "Symphony For Twenty Thousand Cats, Movement Three"
        item $ Just "Symphony For Twenty Thousand Cats, Movement Four"
    mapM_ e [17 / 32, 35 / 64 .. 1]
    textblock' (vw 0.2) (vh 0.7) $ parbox Nothing (Em 15) "This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/."

e x = textblock' (vw x) (vh $ 0.35 + x / 2) $ rotatebox' ((sin x * pi * 2) * (-180) / pi - 90) $ fontsize (vw 0.05) (vw 0) "YOU ARE HERE YOU ARE HERE YOU ARE HERE"
